Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(prospective-parachains): Implement HandleIntroduceSecondedCandidate #4350

Open
wants to merge 74 commits into
base: feat/parachain
Choose a base branch
from

Conversation

rebonat0
Copy link

@rebonat0 rebonat0 commented Nov 28, 2024

Changes

This PR introduces the HandleIntroduceSecondedCandidate func to prospectiveparachains package.

Notes:
currently there's no implementation for ImplicitView, reference is:
polkadot-sdk reference

Tests

go test -timeout 30s github.com/ChainSafe/gossamer/dot/parachain/prospective-parachains

Issues

closes #4308

@CLAassistant
Copy link

CLAassistant commented Nov 28, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@EclesioMeloJunior EclesioMeloJunior changed the title Feature: Implement HandleIntroduceSecondedCandidate on prospectiveparachains package feat(prospective-parachains): Implement HandleIntroduceSecondedCandidate Nov 28, 2024
@EclesioMeloJunior
Copy link
Member

should wait the merge of branch of #4337

@EclesioMeloJunior EclesioMeloJunior deleted the branch ChainSafe:feat/parachain January 6, 2025 20:51
@EclesioMeloJunior
Copy link
Member

@rebonat0 this PR is unblocked now, sorry for the long delay!

@EclesioMeloJunior EclesioMeloJunior changed the base branch from eclesio/fragment-chain-impl to feat/parachain January 7, 2025 13:23
@haikoschol
Copy link
Contributor

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@rebonat0 please sign the CLA

Copy link
Contributor

@haikoschol haikoschol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small issues and two formatting nits.

perRelayParent: make(map[common.Hash]*relayParentData),
activeLeaves: make(map[common.Hash]bool),
implicitView: nil, // TODO: currently there's no implementation for ImplicitView, reference is:
// https://github.com/ChainSafe/gossamer/blob/main/lib/prospective_parachains/view.go#L10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


if err != nil {
logger.Tracef("hashing candidate: %s", err.Error())
response <- false
Copy link
Contributor

@haikoschol haikoschol Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually the writer closes the channel when it is done. Will this channel be used somewhere else as well or should it be closed here?

If it should be closed here, I suggest adding defer close(response) at the top of the function.

If you are unsure we can leave it as is and figure it out later. In that case please add a TODO comment somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants